package com.magic.smartcity.base;

import android.app.Application;
import android.content.Context;
import android.content.SharedPreferences;

import com.magic.smartcity.utils.Constant;

import dagger.hilt.android.HiltAndroidApp;

/**
 * @description:
 * @create: Create by Magic on 2022/2/5.
 */
@HiltAndroidApp
public class BaseApplication extends Application {
    public static Context mContext = null;

    public BaseApplication() {
        super();
    }

    @Override
    public void onCreate() {
        mContext = getApplicationContext();
        SharedPreferences sharedPreferences = getSharedPreferences("login-user", MODE_PRIVATE);
        Constant.TOKEN = sharedPreferences.getString("token", null);
        super.onCreate();
    }
}
